package cn.stacey.spring.ssm.exception;
/**
 * 通用的service层的异常
 * @author 袁
 *
 */
public class ServiceException extends RuntimeException{
	private int code;
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}

	public ServiceException(int code) {
		super();
		//?
		this.setCode(code);;
	}
	public ServiceException(int code,String msg) {
		//父类里面有message，出错会传过来错误消息
		super(msg);
		this.setCode(code);
	}
}
